home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / rjs.lha / RJS / Transport / tests / uclient.C < prev    next >
C/C++ Source or Header  |  1991-06-14  |  420b  |  25 lines

  1. #include <iostream.h>
  2. #include <stdio.h>
  3. #include <osfcn.h>
  4. #include <libc.h>
  5.  
  6. #include "RJS/Transport.h"
  7.  
  8. void test ()
  9. {
  10.   char buffer[10];
  11.   RJS_UnixAddress ua("./sock");
  12.   RJS_UnixStream server;
  13.  
  14.   server.open(ua,Socket::Client); // open connection to server
  15.   server.read(buffer,6);                // read from server
  16.   cout << "Client read: " << buffer<< endl;
  17.  
  18. }
  19.  
  20. int main(int argc, char *argv[]) 
  21. {
  22.   test();
  23.   exit(0);
  24. }
  25.